﻿using System;
using System.Collections.Generic;
using System.Text;
using System.ServiceProcess;
using System.ComponentModel;

namespace CenterDateAchieve
{
    public class DataTranferService : ServiceBase

    {
        // Fields
        private GenericApp appRun_;
        private IContainer components = null;

        // Methods
        public DataTranferService()
        {
            base.CanPauseAndContinue = true;
            base.CanShutdown = true;
            base.CanHandleSessionChangeEvent = false;
            base.ServiceName = "DataTranferService";
            this.appRun_ = new GenericApp();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            base.ServiceName = "DataTranferService";
        }

        protected override void OnStart(string[] args)
        {
            this.appRun_.OnStart();
        }

        protected override void OnStop()
        {
            this.appRun_.OnStop();
        }

    }
}
